package com.ceba.test.modules.signvisual.enums;

import com.ceba.test.modules.signvisual.logicService.SignVisualLogicAbstractAllService;
import com.ceba.test.modules.signvisual.logicService.SignVisualLogicAbstractService;
import com.ceba.test.modules.signvisual.logicService.abstracts.SignVisualAbstract;

public enum SignVisualAbstractEnum {
	ONESIGN("单签(签名只签一次)", SignVisualLogicAbstractService.class),
	ALLSIGN("多签(签名只签一次)", SignVisualLogicAbstractAllService.class);
	private String name;
	private Class classPath;
	private SignVisualAbstractEnum(String name, Class classPath) {
		this.name = name;
		this.classPath = classPath;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Class getClassPath() {
		return classPath;
	}
	public void setClassPath(Class classPath) {
		this.classPath = classPath;
	}
	
	public SignVisualAbstract getSignVisualAbstract(){
		try{
			return (SignVisualAbstract) classPath.newInstance();
		}catch(Exception e){
			e.printStackTrace();
		}
		return null;
	}
}
